package svc

import (
	"car/api/internal/config"
	"car/carrpc/carrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	CarRpc carrpcclient.Carrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		CarRpc: carrpcclient.NewCarrpc(zrpc.MustNewClient(c.CarRpc)),
	}
}
